import java.util.Random;
import java.util.Scanner;

public class Test {
    public static void menu(){
        System.out.println("*****************");
        System.out.println("******1.play*****");
        System.out.println("******0.quit*****");
        System.out.println("*****************");
    }
    public static void game(){
        //        随机数的生成
        Random random = new Random();
        int randomInt = random.nextInt(100);

        System.out.println("有一个0-100的随机数，青菜一下吧");

        while (true){
            Scanner scanner = new Scanner(System.in);
            int guess = scanner.nextInt();
            if (guess > randomInt){
                System.out.println("大了大了");
            } else if (guess < randomInt) {
                System.out.println("小了小了");
            }
            else {
                System.out.println("猜中了");
                break;
            }
        }



    }
    public static void main(String[] args) {

        menu();
        System.out.println("请输入：");
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        switch (input){
            case 1:{
                game();
            }
            case 0:{
                System.out.println("退出游戏！");
            }
        }

    }
}
